package com.zpark.boot.service.impl;

import com.zpark.boot.mapper.IPersonMapper;
import com.zpark.boot.pojo.Person;
import com.zpark.boot.service.IPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PackageName: com.zpark.boot.service.impl
 * @ClassName: PersonServiceImpl
 * @Description:
 * @author: RZS
 * @date: 2024/4/2  8:59
 */
@Service
public class PersonServiceImpl implements IPersonService {

    // 自动注册持久层对象
    @Autowired
    private IPersonMapper personMapper;

    @Override
    public List<Person> findAll() {
        return personMapper.selectAll();
    }

    @Override
    public Person findByUname(String uname) {
        return personMapper.selectByUsername(uname);
    }
}
